package com.it.service.impl;

import com.it.dao.UserDao;
import com.it.entity.User;
import com.it.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 羡羡
 */
@Service
public class UserServicesimpl implements UserService {
    @Autowired
    UserDao usdao;

    /**
     * 查询所有
     * @return
     */
    @Override
    public List getlisUser() {
        List lis=usdao.getlisUser();
        return lis;
    }

    /**
     * 登入
     * @param us
     * @return
     */
    @Override
    public User login(User us) {
        User user=usdao.login(us);
        return user;
    }


    /**
     * 注册
     * @param us
     * @return
     */
    @Override
    public int Useradd(User us) {
        int adsu=usdao.Useradd(us);
        return adsu;
    }

    /**
     * 头像上传
     * @param us
     * @return
     */
    @Override
    public int UserUpda(User us) {
        int h=usdao.UserUpda(us);
        return h;
    }
}
